﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL;
using Model;
using System.Data;
using System.Data.SqlClient;

namespace BLL
{
   public class wenjuanBO
    {
       private readonly wenjuanDAO dal = new wenjuanDAO();


       /// <summary>
       /// 得到最大ID
       /// </summary>
       public int GetMaxId()
       {
           return dal.GetMaxId();
       }

       /// <summary>
       /// 是否存在该记录
       /// </summary>
       public bool Exists(int ID)
       {
           return dal.Exists(ID);
       }

       /// <summary>
       /// 增加一条数据
       /// </summary>
       public int Add(wenjuanClass model)
       {
           return dal.Add(model);
       }

       public int Update(wenjuanClass model)
       {
           return dal.Update(model);
       }

       /// <summary>
       /// 获得数据列表
       /// </summary>
       public DataSet GetList(string strWhere)
       {
           return dal.GetList(strWhere);
       }


       /// <summary>
       /// 获得数据列表
       /// </summary>
       public DataSet GetList()
       {
           return dal.GetList();
       }

       public DataSet GetList7()
       {
           return dal.GetList7();
       }

       public DataSet GetList8()
       {
           return dal.GetList8();
       }

       public SqlDataReader GetData()
       {
           return dal.GetData();
       }


       public int GetByFromUserName(string userid)
       {
          return dal.GetByFromUserName(userid);
       }

       /// <summary>
       /// 是否存在该记录
       /// </summary>
       public bool Exists(string userid)
       {
           return dal.Exists(userid);
       }


       //public SqlDataReader GetData(int id)
       //{
       //    return dal.GetData(id);
       //}
    }
}
